package org.javaboy.am_demo.controller;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @GetMapping("/app/hello")
    public String hello() {
        return SecurityContextHolder.getContext().getAuthentication().getName();
    }
}
